/**
 * Created by Administrator on 2017/3/25.
 */
// articleType":1 多图 0专题
app.controller('homeCtrl',
['$scope','$location','$http','$rootScope','$routeParams', function ($scope,$location,$http,$rootScope,$routeParams) {
    // channel菜单隐藏与消失

   // $scope.navddd=["helo1","你好2",'liiuyang3','哦4',"弄好5",'哪里呢6','哪呢7','哪里呢8','哪呢9','哪呢10','哪呢11'];
    $scope.channeList=false;
    $scope.changeChanList=function () {
        if($scope.channeList){
            $scope.channeList=false;
        }else if(!$scope.channeList){
            $scope.channeList=true;

        }
    };

    //回到顶部
    $(".fiBtn").hide();
    $(window).on("scroll", function(){
        if($(window).scrollTop() >0){
            $(".fiBtn").show();
        }else{
            $(".fiBtn").hide();
        }
    });
    $scope.goBackTop=function () {
            $("body").animate({scrollTop: 0}, 300);
    };


    //频道列表切换
   var coluIds=$routeParams.coluId;
    if(coluIds!=undefined) {
        $scope.chanNav(coluIds);
    }
}]);

app.directive('repeatFinish',function(){
    return {
        link: function(scope,element,attr){
            if(scope.$last == true){
                console.log('ng-repeat执行完毕')

            }
        }
    }
})




